package string;

public class StringConstructor {
    public static void main(String[] args) {
        char[] c={'a','b','c','e','g','i','j','k','l','m','n','o','p','q','r','s'};//char类型的数组
        String s1=new String();
        String s2=new String(c);
        String s3=new String(c,5,5);
        String s4=new String("XYZ");
        System.out.printf(s1+" "+s2+" "+s3+" "+s4+" ");
    }
}
